import request from '@/utils/request'

export default {
	/**
	 * @method增值产品列表
	 */
	financialProductsList(data) {
	  return request({
	    url: `/ws/financialProducts/list`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method计算预计收益
	 */
	financialProductsCount(data) {
	  return request({
	    url: `/ws/financialProducts/count/duePrice`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method购买理财产品
	 */
	financialProductsBuy(data) {
	  return request({
	    url: `/ws/financialProducts/buy`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method我的理财产品
	 */
	financialProductsBuyList(data) {
	  return request({
	    url: `/ws/financialProducts/buyList`,
	    method: "get",
		data
	  });
	},
	
	
	/**
	 * @method拼团业绩列表
	 */
	groupSettleRecord(data) {
	  return request({
	    url: `/action/groupBuyArea/groupSettleRecord`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method团购立即抢购
	 */
	joinGroupNum(data) {
	  return request({
	    url: `/action/groupBuyArea/joinGroupNum`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method团购tabs
	 */
	groupList() {
	  return request({
	    url: `/action/groupBuyArea/groupList`,
	    method: "get",
	  });
	},
	
	/**
	 * @method团购List
	 */
	groupNumList(data) {
	  return request({
	    url: `/action/groupBuyArea/groupNumList`,
	    method: "get",
		data
	  });
	},
	
	/**
	 * @method出售方取消
	 * @param {Object} id
	 */
	sellCancelDemand(id) {
	  return request({
	    url: `/action/marketDemand/sellCancelDemand/${id}`,
	    method: "get",
	  });
	},
	
	/**
	 * @method出售方完成接口
	 * @param {Object} id
	 */
	sellFinishDemand(id) {
	  return request({
	    url: `/action/marketDemand/sellFinishDemand/${id}`,
	    method: "get",
	  });
	},
	
	/**
	 * @method求购取消完成接口
	 * @param {Object} id
	 * @param {Object} state
	 */
	payUpdateDemand(id, state) {
	  return request({
	    url: `/action/marketDemand/payUpdateDemand/${id}/${state}`,
	    method: "get",
	  });
	},
	
	// 确认支付凭证
	marketDemand(data) {
	  return request({
	    url: `/action/marketDemand`,
	    method: "put",
	    data,
	  });
	},
	
	/**
	 * @method市场详情接口
	 */
	sellDemandList(data) {
	  return request({
	    url: `/action/marketDemand/sellDemandList`,
	    method: "get",
	    data,
	  });
	},
	
	/**
	 * @method市场订单列表查询
	 * @param {Object} query
	 */
	marketDemandmineList(query) {
	  return request({
	    url: "/action/marketDemand/mineList",
	    method: "get",
	    params: query,
	  });
	},
	
	/**
	 * @method新增卖出
	 * 
	 */
	releaseSellMarketDemand(data) {
		return request({
			url: `/action/marketDemand/releaseSellMarketDemand`,
			method: 'post',
			data
		})
	},

	/**
	 * @method新增需求
	 * 
	 */
	releaseMarketDemand(data) {
		return request({
			url: `/action/marketDemand/releaseMarketDemand`,
			method: 'post',
			data
		})
	},

	/**
	 * @method需求列表
	 */
	marketDemandAppList(data) {
		return request({
			url: `/action/marketDemand/appList`,
			method: 'get',
			data
		})
	},


	/**
	 * @method查询今日单价
	 */
	getTodayPrice() {
		return request({
			url: `/action/lebaotong/getTodayPrice`,
			method: 'get',
		})
	},

	// 转账
	moneySend(data) {
		return request({
			url: `/ws/userRich/moneySend/${data.userName}/${data.moneyTypeId}/${data.amount}/${data.payPassword}`,
			method: 'get',
		})
	},

	//折线图
	lubaoStatictics(params) {
		return request({
			url: `/action/lebaotong/statistics`,
			method: 'GET',
			data: params
		})
	},

	//统计
	lubaoResult() {
		return request({
			url: `/action/lebaotong/lebaotongResult`,
			method: 'GET',
		})
	},

	// 输入兑换码
	useCode(params) {
		return request({
			url: `/coupon/code/useCode`,
			method: 'GET',
			data: params
		})
	},

	// 根据货币id查货币详情
	moneyDetail(id) {
		return request({
			url: `/admin/moneyType/${id}`,
			method: 'get',
		})
	},

	// 货币转换
	moneyChange(id, amount) {
		return request({
			url: `/ws/userRich/moneyChange/${id}/${amount}`,
			method: 'get',
		})
	},
}